from django.db import models

# Create your models here.
class Question(models.Model):
    ChoType=[('0','填空题'),('1','单选题'),('2','简答题'),('3','作文题')]
    #标题
    title=models.CharField(max_length=255,null=False)
    #类型
    Qtype=models.CharField(max_length=255,choices=ChoType)
    #选项+
    option1=models.CharField(max_length=255)
    option2 = models.CharField(max_length=255)
    option3 = models.CharField(max_length=255)
    option4 = models.CharField(max_length=255)
    #答案
    answer=models.CharField(max_length=255)
    #题目创建时间
    CreatTime=models.DateTimeField(auto_now_add=True)
    #题目更新时间
    NowTime=models.DateTimeField(auto_now=True)